import java.util.HashMap;
import java.util.Map;
import java.util.Objects;


class Node {
    public String key;
    public Node(String key) {
        this.key = key;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Node node = (Node) o;
        return Objects.equals(key, node.key);
    }

    @Override
    public int hashCode() {
        return Objects.hash(key);
    }
}
public class Test {
    public static void main(String[] args) {
        Map<String,Integer>map=new HashMap<>();

    }
    public static void main1(String[] args) {
        Node node1=new Node("123");
        Node node2=new Node("123");
        System.out.println(node1.hashCode());
        System.out.println(node2.hashCode());
        System.out.println(node1.equals(node2));
    }
}
